package sos

import "time"

type Sos struct {
	Id       int       `json:"id" gorm:"comment:编号"`
	Extent   string    `json:"extent" gorm:"comment:程度"`
	Classify string    `json:"classify" gorm:"comment:分类"`
	Abstract string    `json:"abstract" gorm:"comment:摘要"`
	Area     string    `json:"area" gorm:"comment:地域"`
	Status   int       `json:"status" gorm:"comment:状态;default:-1"`
	CreateAt time.Time `json:"create_at" gorm:"autoCreateTime"`
	*Detail  `json:"details"`
}

type Detail struct {
	Name      string `json:"name" gorm:"comment:联系人姓名"`
	Telephone string `json:"telephone" gorm:"comment:联系人电话"`
	Address   string `json:"address" gorm:"comment:联系人详细地址"`
	Content   string `json:"content" gorm:"comment:需要的物质"`
}

// TableName 自定义表名
func (Sos) TableName() string {
	return "sos"
}
